﻿#ifndef TYPICAL_PARAMETER_H
#define TYPICAL_PARAMETER_H

#include "BPAFilesIO.h"

namespace Swi
{
    /* 典型稳定参数 */

    // 发电机相关的参数
    struct TypicalGenerator
    {
        int line_num_start;
        int line_num_end;
        std::string name;
        std::string type;
        double voltage;
        double capacity;
        std::string generator_cards_str;

        Swi::M m;
        Swi::MCF mcf;
        Swi::MG mg;
        // 典型发电机中无LN卡

        Swi::E e;
        Swi::F f;
        Swi::FZ fz;
        Swi::FMV fmv;
        Swi::Fplus fplus;

        Swi::SF sf;
        Swi::SP sp;
        Swi::SG sg;
        Swi::SS ss;
        Swi::SI si;
        Swi::SIplus siplus;

        Swi::GG gg;
        Swi::GHht gh;
        Swi::GS gs;
        Swi::GA ga;
        Swi::GI gi;
        Swi::GIplus giplus;
        Swi::GJ gj;
        Swi::TA ta;
        Swi::TB tb;

        Swi::GE ge;
        Swi::GEplus geplus;
        Swi::MX mx;
        Swi::EZ ez;
        Swi::MW mw;
        Swi::TG tg;
        Swi::GB gb;
        Swi::WINDG_GE wind;
        Swi::RE re;
        Swi::REplus replus;
    };

    class TypicalParameter
    {
    public:
        TypicalParameter();
        ~TypicalParameter();

        // 读取典型稳定参数
        std::vector<Swi::TypicalGenerator> ReadTypicalSwi(std::string filename);

        // 典型发电机参数替换，swi中可能不存在发电机参数
        int TypicalGeneratorReplace(Swi::SwiFile swi_file, Swi::TypicalGenerator typical_generator, std::string replace_generator_name);

    private:

    };

}

#endif